<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <script crossorigin src="https://unpkg.zhimg.com/react@18/umd/react.production.min.js"></script>
  <script crossorigin src="https://unpkg.zhimg.com/react-dom@18/umd/react-dom.production.min.js"></script>
  <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
  <title>demo6</title>
</head>

<body>
  <div id="root"></div>
  <script type="text/babel">
    const rootElement = document.getElementById("root"); const children = <span>Hello </span>; const className = 'demo6'; const id = 'demo6'; const root = ReactDOM.createRoot(rootElement); const ele =
    <div className={className} id={id}>{children}</div>
    /* root.render(ele); */ const ele2 =
    <div className={className} id={id} children={children}></div>;/* root.render(ele2); */ const props = { className, id, children }; const ele3 =
    <div {...props} />; /* root.render(ele3); */ const ele4 =
    <div {...props} id='demo-666' />; root.render(ele4);
  </script>
</body>

</html>